<!DOCTYPE html>
<html>
{% load staticfiles %}
<head>
	<meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
	<title>{{ title }}</title>
	<link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
	<link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
	<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'js/plugins/queryCity/css/cityLayout.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/lq.datetimepick.css' %}"/>
    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}" type="text/javascript"></script>

</head>
<body>
<section class="headerwrap headerwrap2">
    <header>
		<div  class="header2 header">
 			<div class="top">
				{% if request.user.is_authenticated %}
                <div class="top">
				    <div class="wp">
					<div class="fl"><p>服务电话：<b>15068895421</b></p></div>
					<!--登录后跳转-->

                    <div class="personal">
                            <dl class="user fr">
                                <dd>{{ user.username }}</dd>
                                <dt><img width="20" height="20" src="{{ MEDIA_URL }}{{ user.image }}"/></dt>
                            </dl>
                            <div class="userdetail">
                            	<dl>
                                    <dt><img width="80" height="80" src="{{ MEDIA_URL }}{{ user.image }}"/></dt>
	                                <dd>
	                                    <h2>{{ user.nick_name }}</h2>
	                                    <p>{{ user.username }}</p>
	                                </dd>
                                </dl>
                                <div class="btn">
	                                <a class="personcenter fl" href="/user_center/">进入个人中心</a>
	                                <a class="fr" href="">退出</a>
                                </div>
                            </div>
                        </div>
				</div>
			    </div>
            {% else %}
                 <div class="top">
				<div class="wp">
					<div class="fl"><p>服务电话：<b>{{ phoneNumber }}</b></p></div>
					<!--登录后跳转-->


                        <a style="color:white" class="fr registerbtn" href="{% url 'register' %}">注册</a>
                        <a style="color:white" class="fr loginbtn" href="{% url 'login' %}">登录</a>
				</div>
			</div>
            {% endif %}
			</div>
            
    <div class="middle">
        <div class="wp">
            <a href="http://www.cjlu.edu.cn"><img class="fl" src="{% static 'images/code1.jpg' %}"/></a>
            <h1>{{ title }}</h1>
        </div>
    </div>
			</div>
    </header>
</section>



<!--crumbs start-->

    <section>
        <div class="wp">
            <ul  class="crumbs">
                <li><a href="/">首页</a>></li>
                <li><a href="{% url 'user_center' %}">个人中心</a>></li>
                <li>个人资料</li>
            </ul>
        </div>
    </section>

<section>
	<div class="wp list personal_list">
	<div class="left">
        <ul>
            <li class="active2"><a href="usercenter-info.html">个人资料</a></li>
            <li><a href="{% url 'paper_list' %}">我的考试</a></li>
        </ul>
	</div>

    
    <div class="right">
		<div class="personal_des ">
			<div class="head" style="border:1px solid #eaeaea;">
				<h1>个人信息</h1>
			</div>
			<div class="inforcon">
				<div class="left" style="width:242px;">
                    <iframe id='frameFile' name='frameFile' style='display: none;'></iframe>
                    <form class="clearfix" id="jsAvatarForm" enctype="multipart/form-data" autocomplete="off" method="post" action="/users/image/upload/" target='frameFile'>
                        <label class="changearea" for="avatarUp">
                            <span id="avatardiv" class="pic">
                                <img width="100" height="100" class="js-img-show" id="avatarShow"
                                     src="{{ MEDIA_URL }}{{ user.image }}"/>
                            </span>
                            <span class="fl upload-inp-box" style="margin-left:70px;">
                                <span class="button btn-green btn-w100" id="jsAvatarBtn">修改头像</span>
                                <input type="file" name="image" id="avatarUp" class="js-img-up"/>
                            </span>
                        </label>
                        {% csrf_token %}
                    </form>
				</div>
				<form class="perinform" id="jsEditUserForm" autocomplete="off">
					<ul class="right">
						<li>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：
                            <input type="text" name="nick_name" id="nick_name" value="{{ user.nick_name }}"
                                   maxlength="10"/>
                            <i class="error-tips"></i>
                        </li>
						<li>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日：
                            <input type="text" id="birth_day" name="birthday" {% if  user.birthday %}
                                   value="{{ user.birthday }}" {% else %}
                                  value="yyyy-mm-dd"{% endif %}
                                  readonly="readonly"/>
                            <i class="error-tips"></i>
						</li>
						<li>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
                            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="gender" value="male"
                                    {% if user.gender == "male" %} checked="checked" {% endif %}>男</label>
                            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="gender" value="female"
                                    {% if user.gender == "female" %} checked="checked" {% endif %}>女</label>
						</li>
						<li>手&nbsp;&nbsp;机&nbsp;&nbsp;号：
                            <input type="text" name="mobile" id="mobile" placeholder="请输入你的手机号码"
                                   value="{{ user.mobile }}" maxlength="11">
                        </li>
						<li class="button heibtn">
							<input type="button" id="jsEditUserBtn" value="保存">
						</li>
					</ul>
                    {% csrf_token %}
				</form>
			</div>
		</div>
	</div>


	</div>
</section>


<!--sidebar start-->
<section>
    <ul class="sidebar">
        <li class="qq">
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=410018832&site=qq&menu=yes"></a>
        </li>
        <li class="totop"></li>
    </ul>
</section>
<!--sidebar end-->
<!--header start-->


<div class="bg" id="dialogBg"></div>


<script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script type="text/javascript" src="{% static 'js/plugins/laydate/laydate.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>
<script src="{% static 'js/validateDialog.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>

<script src='{% static 'js/plugins/jquery.upload.js' %}' type='text/javascript'></script>
<script src="{% static 'js/validate.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-user.js' %}"></script>
{##}
{#<script type="text/javascript">#}
{#    $('.jsDeleteFav_course').on('click', function(){#}
{#        var _this = $(this),#}
{#            favid = _this.attr('data-favid');#}
{#        alert(favid)#}
{#        $.ajax({#}
{#                cache: false,#}
{#                type: "POST",#}
{#                url: "/org/add_fav/",#}
{#                data: {#}
{#                    fav_type: 1,#}
{#                    fav_id: favid,#}
{#                    csrfmiddlewaretoken: '799Y6iPeEDNSGvrTu3noBrO4MBLv6enY'#}
{#                },#}
{#                async: true,#}
{#                success: function(data) {#}
{#                    Dml.fun.winReload();#}
{#                }#}
{#            });#}
{#    });#}
{##}
{#    $('.jsDeleteFav_teacher').on('click', function(){#}
{#            var _this = $(this),#}
{#                favid = _this.attr('data-favid');#}
{#            $.ajax({#}
{#                    cache: false,#}
{#                    type: "POST",#}
{#                    url: "/org/add_fav/",#}
{#                    data: {#}
{#                        fav_type: 3,#}
{#                        fav_id: favid,#}
{#                        csrfmiddlewaretoken: '799Y6iPeEDNSGvrTu3noBrO4MBLv6enY'#}
{#                    },#}
{#                    async: true,#}
{#                    success: function(data) {#}
{#                        Dml.fun.winReload();#}
{#                    }#}
{#                });#}
{#        });#}
{##}
{##}
{#    $('.jsDeleteFav_org').on('click', function(){#}
{#            var _this = $(this),#}
{#                favid = _this.attr('data-favid');#}
{#            $.ajax({#}
{#                    cache: false,#}
{#                    type: "POST",#}
{#                    url: "/org/add_fav/",#}
{#                    data: {#}
{#                        fav_type: 2,#}
{#                        fav_id: favid,#}
{#                        csrfmiddlewaretoken: '799Y6iPeEDNSGvrTu3noBrO4MBLv6enY'#}
{#                    },#}
{#                    async: true,#}
{#                    success: function(data) {#}
{#                        Dml.fun.winReload();#}
{#                    }#}
{#                });#}
{#        });#}
{#</script>#}
{##}
{##}
{#<script>#}
{#        var shareUrl = '',#}
{#            shareText = '',#}
{#            shareDesc = '',#}
{#            shareComment = '';#}
{#        $(function () {#}
{#            $(".bdsharebuttonbox a").mouseover(function () {#}
{#                var type = $(this).attr('data-cmd'),#}
{#                    $parent = $(this).parent('.bdsharebuttonbox'),#}
{#                    fxurl = $parent.attr('data-url'),#}
{#                    fxtext = $parent.attr('data-text'),#}
{#                    fxdesc = $parent.attr('data-desc'),#}
{#                    fxcomment = $parent.attr('data-comment');#}
{#                switch (type){#}
{#                    case 'tsina':#}
{#                    case 'tqq':#}
{#                    case 'renren':#}
{#                            shareUrl = fxurl;#}
{#                            shareText = fxdesc;#}
{#                            shareDesc = '';#}
{#                            shareComment = '';#}
{#                        break;#}
{#                    default :#}
{#                            shareUrl = fxurl;#}
{#                            shareText = fxtext;#}
{#                            shareDesc = fxdesc;#}
{#                            shareComment = fxcomment;#}
{#                        break;#}
{#                }#}
{#            });#}
{#        });#}
{#        function SetShareUrl(cmd, config) {#}
{#            if (shareUrl) {#}
{#                config.bdUrl = "" + shareUrl;#}
{#            }#}
{#            if(shareText){#}
{#                config.bdText = shareText;#}
{#            }#}
{#            if(shareDesc){#}
{#                config.bdDesc = shareDesc;#}
{#            }#}
{#            if(shareComment){#}
{#                config.bdComment = shareComment;#}
{#            }#}
{##}
{#            return config;#}
{#        }#}
{#        window._bd_share_config = {#}
{#            "common": {#}
{#                "onBeforeClick":SetShareUrl,#}
{#                "bdPic":"",#}
{#                "bdMini":"2",#}
{#                "searchPic":"1",#}
{#                "bdMiniList":false#}
{#            },#}
{#            "share": {#}
{#                "bdSize":"16"#}
{#            }#}
{#        };#}
{#    with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com../api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];#}
{#</script>#}
</body>
</html>
